namespace DeviceCommons.DeviceMessages.Serialization
{
    /// <summary>
    /// 支持上下文的解析器接口
    /// </summary>
    public interface IContextAwareParser
    {
        /// <summary>
        /// 设置解析上下文
        /// </summary>
        /// <param name="context">解析上下文</param>
        void SetContext(ParsingContext context);

        /// <summary>
        /// 获取当前解析上下文
        /// </summary>
        /// <returns>解析上下文</returns>
        ParsingContext? GetContext();
    }
}
